package com.cib.xagcjs.web;

import com.cib.xagcjs.biz.PayContentService;
import com.cib.xagcjs.common.RmbResponse;
import com.cib.xagcjs.dto.PaymentRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 获取支付详情入口
 */
@RestController
@RequestMapping(value = "/pay")
public class PayContentController {

    @Autowired
    private PayContentService payContentService;

    /**
     * 行内向外请求接口，调用区块链获取支付详情信息
     * @param req 请求信息
     * @return 相应数据
     */
    @PostMapping("/query")
    public RmbResponse queryPaymentInfo(@RequestBody PaymentRequest req) {
        return payContentService.queryPaymentInfo(req);
    }
}
